package org.fatewa.engine.magic.db.bean;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @author fatewa
 */
@Data
public class Schema {
    private String name;
    private List<Table> tables;

    public Schema(String name) {
        setName(name);
    }

    public Schema table(Table table) {
        if (null == tables) {
            this.tables = new ArrayList<>();
        }
        tables.add(table);
        return this;
    }
}
